
import { Toaster } from "@/components/ui/toaster";
import { Toaster as Sonner } from "@/components/ui/sonner";
import { TooltipProvider } from "@/components/ui/tooltip";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import Index from "./pages/Index";
import Login from "./pages/Login";
import ReportAnalysis from "./pages/ReportAnalysis";
import ReportDetail from "./pages/ReportDetail";
import WearableDevices from "./pages/WearableDevices";
import HealthStore from "./pages/HealthStore";
import My from "./pages/My";
import NotFound from "./pages/NotFound";
import Navbar from "./components/Navbar";
import PageTransition from "./components/PageTransition";

const queryClient = new QueryClient();

const App = () => (
  <QueryClientProvider client={queryClient}>
    <TooltipProvider>
      <Toaster />
      <Sonner />
      <BrowserRouter>
        <Navbar />
        <PageTransition>
          <Routes>
            <Route path="/" element={<Index />} />
            <Route path="/login" element={<Login />} />
            <Route path="/report-analysis" element={<ReportAnalysis />} />
            <Route path="/report-analysis/:id" element={<ReportDetail />} />
            <Route path="/wearable-devices" element={<WearableDevices />} />
            <Route path="/health-store" element={<HealthStore />} />
            <Route path="/my" element={<My />} />
            <Route path="*" element={<NotFound />} />
          </Routes>
        </PageTransition>
      </BrowserRouter>
    </TooltipProvider>
  </QueryClientProvider>
);

export default App;
